package com.zbxx.container.websocket.controller;

import com.zbxx.container.websocket.entity.User;
import com.zbxx.container.websocket.repository.JpaUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 万仁杰
 * @date 2019/05/21
 */
@RestController
public class UserController {


    @Autowired
    private JpaUserRepository jpaUserRepository;

    @GetMapping("/user/add")
    public void saveUser(){
        User user = new User();
        user.setAccount("admin");
        user.setPassword("123456");
        jpaUserRepository.save(user);
    }

}
